#ifndef SETUP_H
#define SETUP_H
#include <yaml-cpp/yaml.h>
// 代码设置
bool TStartExit = true;
bool TStopExit = true;
long long EventNum = 0;
// 实验设置
const int NBD_ToF = 2;
const int NCH_ToF = 8;
// const int NAllCH_ToF = NCH_ToF * NBD_ToF;
const int NCH_Start_ToF = 4;
const int NCH_Stop_ToF = 4;
const int NAllCH_ToF = NCH_Start_ToF + NCH_Stop_ToF;
const int MaxBuf_ToF = 20;
const int MaxSig_ToF = 1000000;
const int NMaxHit_ToF = 2;
static bool UseCoarse = true;            // else use shift
const long long WidCoin_ToF = 100;       // unit: ns
const double TimeSft_ToF = 25.0;         // unit: ns
const double TimeCrs_ToF = 1000.0 / 480; // unit ns
// const double TimeFine_ToF = TimeCrs_ToF / 178;   // unit: ns
const int NTDL_ToF = 200;

const long long WidCoin_TPC = 1000; // unit: ns
const int NBD_TPC = 4;
const int NCH_TPC = 64;
const int MaxSig_TPC = 1000;
const int MaxNData_TPC = 4096;
YAML::Node config = YAML::LoadFile("../config/config.yaml");
vector<string> finalFileName = config["finalFileName"].as<vector<string>>();
const long long WidCoin_ToF_TPC = 2000;

#endif